from datetime import datetime
from typing import Optional, List
from models.alumni.alumni import AlumniBasicModel
from models.common import OID


class AlumniRewardModel(AlumniBasicModel):
    person_ids: Optional[List[OID]]


class AlumniAwardModel(AlumniRewardModel):
    """
    获得奖项
    """
    award_name: Optional[str]
    award_type: Optional[str]
    award_level: Optional[str]
    award_level2: Optional[str]
    award_authority: Optional[str]
    award_time: Optional[datetime]
    achievement_name: Optional[str]
    award_reason: Optional[str]


class AlumniPaperModel(AlumniRewardModel):
    """
    编写著作
    """
    DOI: Optional[str]
    title: Optional[str]
    type: Optional[str]
    abstract: Optional[str]
    authors: Optional[List[str]]
    authors_order: Optional[List[int]]
    publishing_time: Optional[datetime]
    publishing_language: Optional[str]
    publication_organization: Optional[str]
    pages: Optional[str]
    ISBN: Optional[str]


class AlumniJournalPaperModel(AlumniRewardModel):
    """
    期刊论文
    """
    authors: Optional[List[str]]
    authors_rank: Optional[List[int]]
    title: Optional[str]
    keywords: Optional[List[str]]
    abstract_zh: Optional[str]
    abstract: Optional[str]
    n_citation: Optional[int]
    journal_name: Optional[str]
    journal_influencing_factors: Optional[float]
    publishing_time: Optional[datetime]
    publishing_language: Optional[str]
    volume_number: Optional[str]
    issue_number: Optional[str]
    page_number: Optional[str]
    fund_project: Optional[str]
    paper_doi: Optional[str]


class AlumniConferencePaperModel(AlumniRewardModel):
    """
    会议论文
    """
    authors: Optional[List[str]]
    authors_order: Optional[List[int]]
    title: Optional[str]
    keywords: Optional[List[str]]
    abstract_zh: Optional[str]
    abstract: Optional[str]
    n_citation: Optional[int]
    page: Optional[str]
    publication_language: Optional[str]
    conference_name: Optional[str]
    session: Optional[str]
    start_time: Optional[datetime]
    end_time: Optional[datetime]
    location: Optional[str]


class AlumniConstructionProjectModel(AlumniRewardModel):
    """
    参与工程项目
    """
    name: Optional[str]
    abstract: Optional[str]
    approval_origanization: Optional[str]
    person_role: Optional[str]
    start_time: Optional[datetime]
    end_time: Optional[datetime]


class AlumniAcademicProjectModel(AlumniRewardModel):
    """
    参与科研项目
    """
    subject_id: Optional[str]
    name: Optional[str]
    abstract: Optional[str]
    source: Optional[str]
    funds: Optional[float]
    level: Optional[str]
    person_role: Optional[str]
    start_time: Optional[datetime]
    end_time: Optional[datetime]


class AlumniActivityPatentModel(AlumniRewardModel):
    """
    活动专利
    """
    name: Optional[str]
    abstract: Optional[str]
    type: Optional[str]
    classification: Optional[str]
    application_number: Optional[str]
    approval_number: Optional[str]
    publication_language: Optional[str]
    application_date: Optional[datetime]
    approval_date: Optional[datetime]
    patentee: Optional[List[str]]
    sort: Optional[List[int]]
    approval_authority: Optional[str]
    approved_area: Optional[str]
    n_citation: Optional[int]


class AlumniStandardModel(AlumniRewardModel):
    """
    编制标准
    """
    standard_id: Optional[str]
    standard_name: Optional[str]
    standard_type: Optional[str]
    standard_form: Optional[str]
    original_id: Optional[str]
    standard_abstract: Optional[str]
    standard_authors: Optional[List[str]]
    authors_order: Optional[List[int]]
    release_time: Optional[datetime]
    implementation_time: Optional[datetime]
    publishing_language: Optional[str]
    publishing_agency: Optional[str]
    ISBN: Optional[str]
